package com.lumeng.spring.common.constant;

/**
 * @author xiaoke
 * 常量类
 */
public class Constants {
    private Constants() {}

    /**
     * 单页最多条数
     */
    public static final int PAGE_MAX_NUM = 100;

    /**
     * ResponseResult标识
     */
    public static final String RESPONSE_RESULT_ANN = "RESPONSE-RESULT-ANN";

    /**
     * 禁止ResponseResult标识
     */
    public static final String AVOID_RESPONSE_RESULT_ANN = "AVOID-RESPONSE-RESULT-ANN";

    // 1秒的时间戳
    public static final long TIMESTAMP_SECOND = 1000;
    // 1分钟的时间戳
    public static final long TIMESTAMP_MINUTE = 60 * TIMESTAMP_SECOND;
    // 1小时的时间戳
    public static final long TIMESTAMP_HOUR = 60 * TIMESTAMP_MINUTE;
    // 1天的时间戳
    public static final long TIMESTAMP_DAY = 24 * TIMESTAMP_HOUR;
    // 1周的时间戳
    public static final long TIMESTAMP_WEEK = 7 * TIMESTAMP_DAY;

    // 默认的分页起始页
    public static final int DEFAULT_PAGE_NO = 1;
    // 默认的分页大小
    public static final int DEFAULT_PAGE_SIZE = 24;

    // 电话正则表达式
    public static final String REGEXP_PHONE = "^1(3|4|5|7|8)\\d{9}$";
    // 数字正则表达式
    public static final String REGEXP_NUMBER  = "^(-?[1-9]\\d*\\.?\\d*)|(-?0\\.\\d*[1-9])|(-?[0])|(-?[0]\\.\\d*)$";

    // 逗号分隔符
    public static final String COMMA = ",";

    // 批量查询最多的id数
    public static final Integer MAX_BATCH_IDS_LENGTH = 120;

    // 存放token的http head
    public static final String HTTP_HEAD_AUTHORIZATION = "Authorization";

    // 响应加密时候的公钥
    public static final String HTTP_HEAD_RSA_PUBLIC_KEY = "RSAPublicKey";
    // 状态:是
    public static final int STATUS_YES = 1;

    // 状态:否
    public static final int STATUS_NO = 0;

    // 表示请求来自哪个客户端 （1-小程序 2-生活号 3-APP 4-PC端）
    public static final Byte CLIENT_WECHAT_APPLET = 1;
    public static final Byte CLIENT_LIFE_NUM = 2;
    public static final Byte CLIENT_APP = 3;
    public static final Byte CLIENT_PC = 4;

}
